<%-- 
    Document   : Users
    Created on : Dec 1, 2012, 5:48:45 PM
    Author     : Gary
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="<c:url value='/css/main.css'/>" rel="stylesheet" type="text/css"/>
        <title>User</title>
    </head>
    <body>
        <h1>User Management</h1>
        <a href="<s:url namespace="/user" action="create_newuser" />"><b>New User</b></a><br/><br/>
       <table class="borderAll">
            <tr>
                <th><s:text name="User Name"/></th>
                <th><s:text name="Role"/></th>
                <th>&nbsp;</th>
            </tr>
            <s:iterator value="users">
                <tr class="<s:if test="#stat.odd == true">odd</s:if><s:else>even</s:else>">
                    <td><s:property value="userName"/></td>
                    <td><s:property value="role"/></td>
                    <td class="nowrap">
                        <a href="<s:url namespace="/user" action="edit_%{userName}" />"><b>Edit</b></a>
                        &nbsp;&nbsp;&nbsp;
                        <a href="<s:url namespace="/user" action="delete_%{userName}" />"><b>Delete</b></a>
                    </td>
                </tr>
            </s:iterator>
        </table>
    </body>
</html>
